package top.withu.gaof.freehope.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.withu.gaof.freehope.annotate.PassCheck;
import top.withu.gaof.freehope.res.CountArticle;
import top.withu.gaof.freehope.service.CountService;

import javax.annotation.Resource;

/**
 * @Description: 统计模块
 * @Author: gaofan
 * @Date: 2019/10/9 15:39
 * @Copyright: 2019 www.freehope.top Inc. All rights reserved.
 **/
@RestController
@Api("统计模块")
@RequestMapping("/count")
public class CountController {

    @Resource
    private CountService countService;

    @GetMapping("/article")
    @PassCheck
    @ApiOperation(value = "访问统计", notes = "获取统计数据", tags = "count module")
    public CountArticle countArticle(){
        return countService.count();
    }

}
